package com.zhou.basics.business.ad;


import com.zhou.basics.common.core.Result;
import com.zhou.basics.model.Ad;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

/**
 * @ProjectName: tfqingcheng
 * @ClassName: AdController
 * @Time: 2020/2/25
 * @Author: zhou24
 * @Description:
 * @Experience:
 */
@RestController
@RequestMapping("/ad")
public class AdController {
    private static Logger logger = LoggerFactory.getLogger(AdController.class);
    @Resource
    private AdService adService;

    @GetMapping("/selectById")
    public Result selectById(Integer id, HttpServletResponse response) {
        logger.warn("AdController===id:{}",id);
        Result result = new Result();
        Ad ad = adService.selectById(id);
        return result.success(ad);
    }



}
